using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;

public class Job721Item : MonoBehaviour, IPointerClickHandler
{
    public Text NameText;
    Job721Panel _panel;
   public  Job712Data my_data;
    public Transform Bg;
    internal void init(Job712Data shopData, Job721Panel Panel)
    {
        _panel = Panel;
        my_data = shopData;

        NameText.text = shopData.name;

    }
    // Start is called before the first frame update
    void Start()
    {



    }

    // Update is called once per frame
    void Update()
    {

    }
    public string GetMyIcon(int leven)
    {
        switch (leven)
        {
            case 1:
                return "资源切图/白色-底板";
            case 2:
                return "资源切图/绿色-底板";
            case 3:
                return "资源切图/蓝色-底板";
            case 4:
                return "资源切图/紫色-底板";
            case 5:
                return "资源切图/金色-底板";
            default:
                return "";
        }
    }

    internal void SetBg(bool v)
    {
        Bg.gameObject.SetActive(v);
    }

    public void OnPointerClick(PointerEventData eventData)
    {
        _panel.SetItem(my_data.id);
    }
}